package com.fenqing.leetcode.code.t2500_2600;

import com.fenqing.annotations.Execute;
import com.fenqing.core.Topic;

public class Topic2520 extends Topic {

    @Execute
    public int countDigits(int num) {
        int sum = 0;
        int temp = num;
        while (temp > 0) {
            int key = temp % 10;
            if (num % key == 0) {
                sum++;
            }
            temp /= 10;
        }
        return sum;
    }

    public static void main(String[] args) {
        Topic2520 topic2520 = new Topic2520();
        int run = topic2520.run("1248");
        System.out.println(run);
    }

}
